package com.bocloud.cmp.dao;

import java.util.List;
import java.util.Map;

import com.bocloud.cmp.entity.resource.ServerIp;
import com.bocloud.common.model.Param;

/**
 * 服务器地址Dao
 * 
 * @author oywl
 *
 */
public interface ServerIpDao {

    /**
     * 服务器地址
     * 
     * @param page
     * @param rows
     * @param params
     * @param sorter
     * @return
     * @throws Exception
     */
    public List<ServerIp> list(int page, int rows, List<Param> params, Map<String, String> sorter) throws Exception;

    /**
     * 查询主机详细
     * 
     * @param id
     *            the id
     * @return the serverIp
     * @throws Exception
     */
    public List<ServerIp> querybyuuid(String uuid) throws Exception;

    /**
     * 保存
     * 
     * @param entity
     * @return
     * @throws Exception
     */
    public ServerIp save(ServerIp entity) throws Exception;

    /**
     * 更新数据库
     * 
     * @param entity
     * @return
     * @throws Exception
     */
    public boolean update(ServerIp entity) throws Exception;

    /**
     * 删除
     * 
     * @param id
     * @return
     */
    public boolean remove(Long id) throws Exception;

    /**
     * 删除虚拟机的ip地址
     * 
     * @param instanceId
     * @return
     * @throws Exception
     */
    public boolean removebyuuid(String instanceId) throws Exception;

}
